/**
 * Dear programmer:
 * When I wrote this code, only god and I knew how it worked.
 * Now, only god knows it!
 *
 * @author: Pegasus  Date: 2019-02-13 Time: 23:12
 *
 */
import {RequestAction, RequestMethod} from "../configuration/RequestConfiguration"
import {AppRequestPath} from "../configuration/AppConfig"
import {API_EDITPASSWORD} from "../constant/API"
import global from "../configuration/global";

/**
 * 修改密码
 * @param action
 * @param str 条件
 * @returns {*}
 */
export const requestChangePassword = (action, str) => {
    return RequestAction(
        AppRequestPath() + API_EDITPASSWORD,
        RequestMethod.Post,
        {
            "hotelId": global.hotelId,
            "oldPassword" : str.oldPassword,
            "newPassword" : str.newPassword,
            "userid" : str.userid,
            'fu': "AlinusersEdit",
        },
        action
    )
};